<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>设置</title>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="../css/aui.2.0.css">
    <link rel="stylesheet" href="../css/reset.css">
    <link rel="stylesheet" href="../css/common1.css">
    <link rel="stylesheet" href="../css/common.css">
   <link rel="stylesheet" href="../css/alert.css">
    <link rel="stylesheet" href="../css/lessstyle.css">
</head>
<body>
<header class="aui-bar aui-bar-nav" id="aui-header">
    <div class="aui-col-xs-3 my-col-xs-3">
        <i class="aui-iconfont aui-icon-left"></i>
    </div>
    <div class="aui-title my-aui-title">设置</div>
</header>

<nav>
    <div class="member-info-entry" id="member-info-entry">
        <script type="text/x-handlebars-template" id="setup-template">
            <ul class="member-info-list">
                <li>
                    <a href="javascript:;" class="display-box">
                        <span>当前版本</span>
                        <span>{{data}}</span>
                    </a>
                </li>
                <li>
                <a href="javascript:;" class="display-box">清除缓存</a>
                </li>
            </ul>
        </script>
    </div>
    <div class="out-login">退出登录</div>
</nav>
<script src="../js/jquery-3.0.0.min.js"></script>
<script src="../js/handlebars-v4.0.10.js"></script>
<script src="../js/config.js"></script>
<script src="../js/common.js"></script>
<script src="../js/function.js"></script>
<script src="../js/alert.js"></script>
<script>
    var a=$('#setup-template').html();
    var b=Handlebars.compile(a);


    $.ajax({
        url:C.marketInterface.setup,
        type:'GET',
        data:{
            token:C.marketToken,
        },
        datatype:'json',
        success:function (data) {
            console.log(data);
            if(data.result=='success'){
                $('#member-info-entry').html(b(data))
            }else if(data.result=='login'){
            	dialog.tusiError(data.errorMsg);
            }else {
            	dialog.tusiError(data.errorMsg);
            }
        },
        error:function (response) {
        	dialog.tusiError(response.data.errorMsg);
        }
    })

</script>
</body>
</html>